<template>
	<view class="container">
		<view class="list">
			<view class="listin" v-for="(item,index) in list" :key="index">
				<view class="title">
					<text>{{prodetail.tms_order_sn}}</text>
					<text style="color: #d80b17;font-weight: 400;" v-if="prodetail.status==1">未扫码</text>
					<text style="color: #f89200;font-weight: 400;" v-if="prodetail.status==2">已扫码</text>
					<text style="color: #008bf3;font-weight: 400;" v-if="prodetail.status==3">已发车</text>
					<text style="color: #f400e0;font-weight: 400;" v-if="prodetail.status==4">待配送</text>
					<text style="color: #0ACF00;font-weight: 400;" v-if="prodetail.status==5">已送达</text>
				</view>
				<view class="body">
					<text>是否垫付：{{prodetail.is_advance==0?'未垫付':'已垫付'}}</text>
					<text>运费：{{prodetail.all_freight_amount?prodetail.all_freight_amount:'暂无'}}</text>
					<text>是否配送：{{prodetail.is_delivery==0?'是':'否'}}</text>
					<text>配送费：{{prodetail.delivery_amount}}</text>
					<text>垫资金额：{{prodetail.advance_amount}}</text>
					<text>合计：{{prodetail.order_amount}}</text>
				</view>
			</view>
		</view>
		<view class="prolist">
			<view class="prolist_in" v-for="(item,index) in prolist" :key="index">
				<text>货物名称：{{item.goods_name}}</text>
						
				<text>货物件数：{{item.goods_nums}}</text>
				<text>吨数：{{item.goods_weight}}</text>
				<text>货物规格：{{item.goods_specs}}</text>
			</view>
		</view>
		<view class="all">
			
			<view class="allin">
				<text class="bold">收货人地址</text>
				<text>{{prodetail.address}}</text>
			</view>
			<view class="allin">
				<text class="bold">收货人姓名</text>
				<text>{{prodetail.username}}</text>
			</view>
			<view class="allin">
				<text class="bold">收货人电话</text>
				<text>{{prodetail.mobile}}</text>
			</view>
			
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				prodetail:'',
				prolist:[],
				list:[{
					dian:"是",
					yun:'200',
					song:'是',
					pei:"20",
					money:'8000',
					all:'40000'
				}]
			};
		},
		onShow() {
		this.getpro()	
		},
		onLoad(option) {
			this.prodetail=JSON.parse(option.detail)
			console.log(this.prodetail)
		},
		methods:{
			//货物列表
			getpro(){
				this.$orderdetail({
					tms_order_id:this.prodetail.tms_order_id
				}).then(res=>{
					if(res.code!=1){
						this.$toast(res.msg)
						
					}
					this.prolist=res.data.data
				})
			}
		}
		
	}
</script>

<style lang="scss">
.container{
	.list{
		
		.listin{
			padding: 30rpx;
			background-color: #fff;
			box-shadow: 0px 0px 4px 0px rgba(204,204,204,0.5);
		
			margin-bottom: 30rpx;
			.body{
				display: flex;
				flex-wrap: wrap;
				justify-content: space-around;
				text{
					font-size: 32rp;
					width: 40%;
					margin-top: 20rpx;
				}
			}
			.title{
				display: flex;
				padding: 0 0 30rpx 0;
				border-bottom: #ccc 1px dashed;
				justify-content: space-between;
				text{
					font-size: 36rpx;
					color: #000;
					font-weight: 600;
				}
			}
		}
	}
	.prolist{
		.prolist_in{
			margin-top: 20rpx;
			display: flex;
			justify-content: space-around;
			padding: 30rpx;
			flex-wrap: wrap;
			background-color: #fff;
			text{
				font-size: 32rpx;
				width: 40%;
				margin-bottom: 20rpx;
				// margin-top: 20rpx;
			}
		}
	}
	.all{
		margin-top: 20rpx;
		background: #fff;
		padding: 30rpx;
		height: 300rpx;
		display: flex;
		flex-direction: column;
		justify-content: space-around;
		.allin{
			display: flex;
			justify-content: space-between;
			
			text{
				font-size: 32rpx;
				
			}
			.bold{
				font-weight: 600;
			}
		}
	}
}
</style>
